package org.scau.studentevaluation.entity.dtos;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;
import org.scau.studentevaluation.entity.dos.RulesDO;

@Data
public class RuleDTO {



    private String relu;


    private Integer subject;


    private String college;


    private Integer year;


    private Integer reluId;

    /**
     * 转化成DO对象
     * 并解决了历史遗留问题
     * @param dto
     * @return
     */
    public RulesDO converToDO(RuleDTO dto){
        RulesDO rulesDO = new RulesDO();
        rulesDO.setCollege(college);
        rulesDO.setRule(relu);
        rulesDO.setSubject(subject);
        rulesDO.setYear(year);
        rulesDO.setRuleId(reluId);
        return rulesDO;
    }
}
